import axios from '../axios'

/*
 * 用户管理模块
 */

// 保存
export const save = (data) => {
    return axios({
        url: '/busSubject/save',
        method: 'post',
        data
    })
}
// 删除
export const batchDelete = (data) => {
    return axios({
        url: '/busSubject/delete',
        method: 'post',
        data
    })
}
// 分页查询
export const findPage = (data) => {
    return axios({
        url: '/busSubject/findPage',
        method: 'post',
        data
    })
}


// 根据用户名查找
export const findByName = (params) => {
    return axios({
        url: '/busSubject/findByName',
        method: 'get',
        params
    })
}

// 开启综测统计
export const startTerm = (params) => {
  return axios({
      url: '/busSubject/startTerm',
      method: 'get',
      params:{
        id:params
      }
  })
}

export const findUsersBySubject = (params) => {
  return axios({
      url: '/busSubject/findUsersBySubject',
      method: 'get',
      params:{
        subjectId:params
      }
  })
}


export const findSubjectOptions = (params) => {
  return axios({
      url: '/busSubject/findSubjectOptions',
      method: 'get',
      params: params
  })
}
export const findOptions = (params) => {
  return axios({
      url: '/busSubject/findOptions',
      method: 'get',
      params: params
  })
}
